package com.ruijie.autotest.log.common.crypto;

import java.util.Base64;

public class Base64CryptoFactory implements ICryptoFactory {
	private Base64CryptoFactory() {
	}

	@Override
	public Crypto encryption() {
		return rawBytes -> Base64.getEncoder().encode(rawBytes);
	}

	@Override
	public Crypto decryption() {
		return rawBytes -> Base64.getDecoder().decode(rawBytes);
	}

	public static ICryptoFactory get() {
		return new Base64CryptoFactory();
	}
}
